<?php

use backend\widgets\ActiveForm;
use common\libs\Constants;
use backend\models\Mission;
/* @var $this yii\web\View */
/* @var $model backend\models\Mission */
/* @var $form backend\widgets\ActiveForm */
?>
<div class="row">
    <div class="col-sm-12">
        <div class="ibox">
            <?= $this->render('/widgets/_ibox-title') ?>
            <div class="ibox-content">
                <?php $form = ActiveForm::begin([
                    'options' => [
                        'class' => 'form-horizontal'
                    ]
                ]); ?>


                <?= $form->field($model, 'forbidden')->dropDownList(Constants::getForbiddenStatus()) ?>
                <div class="hr-line-dashed"></div>

                <?= $form->field($model, 'title')->textInput(['maxlength' => true]) ?>
                <div class="hr-line-dashed"></div>

                <?= $form->field($model, 'content')->textarea(['rows' => 6]) ?>
                <div class="hr-line-dashed"></div>

                <?= $form->field($model, 'contact_name')->textInput(['maxlength' => true]) ?>
                <div class="hr-line-dashed"></div>

                <?= $form->field($model, 'contact_phone')->textInput(['maxlength' => true]) ?>
                <div class="hr-line-dashed"></div>

                <?= $form->field($model, 'mission_type')->dropDownList(Mission::getMissionTypes()) ?>
                <div class="hr-line-dashed"></div>


                <?= $form->field($model, 'latitude')->textInput()->readOnly() ?>
                <div class="hr-line-dashed"></div>

                <?= $form->field($model, 'longitude')->textInput()->readOnly() ?>
                <div class="hr-line-dashed"></div>

                <?= $form->field($model, 'ad_code')->textInput()->readOnly() ?>
                <div class="hr-line-dashed"></div>
                <?= $form->field($model, 'gender_needed')->radioList(Constants::getGenderNeeded()) ?>
                <div class="hr-line-dashed"></div>
                <?= $form->field($model, 'start_at')->date(['type' => 'date', 'format' => 'yyyy-MM-dd']) ?>
                <div class="hr-line-dashed"></div>
                <?= $form->field($model, 'end_at')->date(['type' => 'date', 'format' => 'yyyy-MM-dd']) ?>
                <div class="hr-line-dashed"></div>
                <?= $form->field($model, 'work_start')->date(['type' => 'time', 'format' => 'HH:mm:ss']) ?>
                <div class="hr-line-dashed"></div>
                <?= $form->field($model, 'work_end')->date(['type' => 'time', 'format' => 'HH:mm:ss']) ?>
                <div class="hr-line-dashed"></div>
                <?= $form->field($model, 'salary')->textInput() ?>
                <div class="hr-line-dashed"></div>
                <?= $form->field($model, 'pay_type')->radioList(Constants::getPayTypeMission()) ?>
                <div class="hr-line-dashed"></div>


                <?= $form->defaultButtons() ?>
                <?php ActiveForm::end(); ?>
            </div>
        </div>
    </div>
</div>